import { Map } from "immutable";
import * as actionTypes from "./constants";

const initialState = Map({
  hotRecommends: [],
});

function reducer(state = initialState, { type, payload }) {
  switch (type) {
    case actionTypes.CHANGE_HOT_RECOMMENDS:
      return state.set("hotRecommends", payload);
    default:
      return state;
  }
}

export default reducer;
